<?php defined('InShopNC') or exit('Access Invalid!'); ?>
<style type="text/css">
    .more-findTea{
        margin-top: 10px;
        float: right;
        font-size: 14px;
        font-weight: bold;
        margin-right: 10px;

    }
</style>
<?php if($_SESSION['member_level']>2) {?>
<div class="block-style-one">
    <div class="title">
        <h3>官方公告</h3>
    </div>
    <div class="content" id="quotation" style="height: 140px; overflow: hidden;">
        <?php if (!empty($output['article_notice_list']) && is_array($output['article_notice_list'])) { ?>
            <ul class="article-recommand-list">
                <?php $commend_count = 1; ?>
                <?php foreach ($output['article_notice_list'] as $value) { ?>
                    <li>
                        <div class="article-title"><a
                                href="<?php echo url('article', 'show', array('article_id' => $value['article_id'])); ?>"><?php echo mb_substr($value['article_title'], 0, 16, 'utf-8'); ?></a><span
                                style="float: right;"><?php echo(date('y-m-d', $value['article_time'])); ?></span></div>
                    </li>
                    <?php $commend_count++; ?>
                <?php } ?>
            </ul>
        <?php } ?>
    </div>
</div>
    <script type="text/javascript">
        $(function(){
            var scrtime;
            if($('#quotation ul li').length>5) {
                $("#quotation").hover(function () {
                    clearInterval(scrtime);

                }, function () {

                    scrtime = setInterval(function () {
                        var $ul = $("#quotation ul");
                        var liHeight = $ul.find("li:last").height();
                        $ul.animate({marginTop: liHeight + "px"}, 1000, function () {

                            $ul.find("li:last").prependTo($ul)
                            $ul.find("li:first").hide();
                            $ul.css({marginTop: 0});
                            $ul.find("li:first").fadeIn(1000);
                        });
                    }, 2000);

                }).trigger("mouseleave");
            }
        });
    </script>
<?php }?>
<div class="block-style-one">
    <div class="title">
        <h3>官方动态</h3><span class="more-findTea"><a href="<?php echo url('article','article',array('ac_id'=>13));?>">更多...</a></span>
    </div>
    <div class="content">
        <?php if (!empty($output['article_news_list']) && is_array($output['article_news_list'])) { ?>
            <ol class="article-recommand-list">
                <?php $commend_count = 1; ?>
                <?php foreach ($output['article_news_list'] as $value) { ?>
                    <li>
                        <div class="article-title"><a
                                href="<?php echo url('article', 'show', array('article_id' => $value['article_id'])); ?>"><?php echo mb_substr($value['article_title'], 0, 16, 'utf-8'); ?></a><span
                                style="float: right;"><?php echo(date('y-m-d', $value['article_time'])); ?></span></div>
                    </li>
                    <?php $commend_count++; ?>
                <?php } ?>
            </ol>
        <?php } ?>
    </div>
</div>
<?php if($_SESSION['member_level']>2) {?>
<div class="block-style-one">
    <div class="title">
        <h3>官方活动</h3><span class="more-findTea"><a href="<?php echo url('article','article',array('ac_id'=>20));?>">更多...</a></span>
    </div>
    <div class="content">
        <?php if (!empty($output['article_actives_list']) && is_array($output['article_actives_list'])) { ?>
            <ol class="article-recommand-list">
                <?php $commend_count = 1; ?>
                <?php foreach ($output['article_actives_list'] as $value) { ?>
                    <li>
                        <div class="article-title"><a
                                href="<?php echo url('article', 'show', array('article_id' => $value['article_id'])); ?>"><?php echo mb_substr($value['article_title'], 0, 16, 'utf-8'); ?></a><span
                                style="float: right;"><?php echo(date('y-m-d', $value['article_time'])); ?></span></div>
                    </li>
                    <?php $commend_count++; ?>
                <?php } ?>
            </ol>
        <?php } ?>
    </div>
</div>
<?php }?>
